package com.bw.zg2.db

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Update
import com.bw.zg2.bean.CartBean

/**
 *
 * @ClassName: CartDao
 * @Description: 购物车到
 * @Author: zhangyanchao
 * @CreateDate: 2024/10/7 11:18 AM
 * @Version: 1.0
 */
@Dao
interface CartDao {

    @Insert
    fun insert(bean: CartBean)

    @Query("select * from cart_bean")
    fun queryAll(): List<CartBean>

    @Query("select * from cart_bean")
    fun query(): CartBean

    @Update
    fun update(bean: CartBean)

    @Delete
    fun delete(bean: CartBean)

    @Query("delete from cart_bean")
    fun deleteAll()

}